home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / Kubuntu 8.10 / kubuntu-8.10-desktop-i386.iso / casper / filesystem.squashfs / etc / acpi / resume.d / 17-video-restore.sh < prev    next >
Linux/UNIX/POSIX Shell Script  |  2008-10-14  |  470b  |  22 lines

  1. #!/bin/sh
  2.  
  3. # Attempt to restore some video card state
  4. if [ x$SAVE_VBE_STATE = xtrue ]; then
  5.   vbetool vbestate restore <$VBESTATE
  6.   if [ $VBEMODE != "3" ]; then
  7.     vbetool vbemode set $VBEMODE;
  8.   else
  9.     vbetool vgamode set 3;
  10.   fi
  11. fi
  12.  
  13. # Restore video PCI state
  14. if [ x$SAVE_VIDEO_PCI_STATE = xtrue ]; then
  15.   for x in /sys/bus/pci/devices/*; do
  16.     if [ -f /var/run/vga-pci-`basename $x` ]; then
  17.         cat /var/run/vga-pci-`basename $x` >$x/config;
  18.     fi
  19.   done
  20. fi
  21.  
  22.